{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "\n",
    "class Pet():\n",
    "    def __init__(self, height):\n",
    "        self.height = height\n",
    "        \n",
    "    is_human = False\n",
    "    owner = 'Michael Smith'\n",
    "    \n",
    "    @classmethod\n",
    "    def owned_by_smith_family(cls):\n",
    "        return 'Smith' in cls.owner\n",
    "    \n",
    "    @classmethod\n",
    "    def create_random_height_pet(cls):\n",
    "        height = random.randrange(0, 100)\n",
    "        return cls(height)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "21\n",
      "3\n",
      "16\n",
      "16\n",
      "80\n"
     ]
    }
   ],
   "source": [
    "for i in range(5):\n",
    "    pet = Pet.create_random_height_pet()\n",
    "    print(pet.height)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
